// ==========================================================================
// GFast自动生成model操作代码。
// 生成日期：2024-04-24 15:48:40
// 生成路径: internal/app/business/model/performances.go
// 生成人：周志雄
// desc:演出节目
// company:云南奇讯科技有限公司
// ==========================================================================

package model

import (
	"github.com/gogf/gf/v2/os/gtime"
	"github.com/gogf/gf/v2/util/gmeta"
)

// PerformancesInfoRes is the golang structure for table performances.
type PerformancesInfoRes struct {
	gmeta.Meta        `orm:"table:performances"`
	Id                int         `orm:"id,primary" json:"id"`                         // 主键ID
	PerformanceName   string      `orm:"performance_name" json:"performanceName"`      // 节目名
	PerformanceDate   *gtime.Time `orm:"performance_date" json:"performanceDate"`      // 演出日期
	PerformanceTime   string      `orm:"performance_time" json:"performanceTime"`      // 演出时间
	StartSaleTime     *gtime.Time `orm:"start_sale_time" json:"startSaleTime"`         // 开售时间
	TicketReclaimTime *gtime.Time `orm:"ticket_reclaim_time" json:"ticketReclaimTime"` // 直通车票号回收时间
	TicketPickupTime  *gtime.Time `orm:"ticket_pickup_time" json:"ticketPickupTime"`   // 取票时间
	VenueId           int         `orm:"venue_id" json:"venueId"`                      // 场馆ID
	ProgramTypeId     int         `orm:"program_type_id" json:"programTypeId"`         // 节目类型ID
	CreatedAt         *gtime.Time `orm:"created_at" json:"createdAt"`                  // 创建时间
	UpdatedAt         *gtime.Time `orm:"updated_at" json:"updatedAt"`                  // 更新时间
}

type PerformancesInfoResVo struct {
	gmeta.Meta        `orm:"table:performances"`
	Id                int         `orm:"id,primary" json:"id"`                         // 主键ID
	PerformanceName   string      `orm:"performance_name" json:"performanceName"`      // 节目名
	PerformanceDate   *gtime.Time `orm:"performance_date" json:"performanceDate"`      // 演出日期
	PerformanceTime   string      `orm:"performance_time" json:"performanceTime"`      // 演出时间
	StartSaleTime     *gtime.Time `orm:"start_sale_time" json:"startSaleTime"`         // 开售时间
	TicketReclaimTime *gtime.Time `orm:"ticket_reclaim_time" json:"ticketReclaimTime"` // 直通车票号回收时间
	TicketPickupTime  *gtime.Time `orm:"ticket_pickup_time" json:"ticketPickupTime"`   // 取票时间
	VenueId           int         `orm:"venue_id" json:"venueId"`                      // 场馆ID
	VenueName         string      `json:"venueName"`                                   // 场馆ID
	ProgramTypeId     int         `orm:"program_type_id" json:"programTypeId"`         // 节目类型ID
	ProgramTypeName   string      `json:"programTypeName"`                             // 节目类型ID
	CreatedAt         *gtime.Time `orm:"created_at" json:"createdAt"`                  // 创建时间
	UpdatedAt         *gtime.Time `orm:"updated_at" json:"updatedAt"`                  // 更新时间
}

type PerformancesListRes struct {
	Id                int         `json:"id"`
	PerformanceName   string      `json:"performanceName"`
	PerformanceDate   *gtime.Time `json:"performanceDate"`
	PerformanceTime   string      `json:"performanceTime"`
	StartSaleTime     *gtime.Time `json:"startSaleTime"`
	TicketReclaimTime *gtime.Time `json:"ticketReclaimTime"`
	TicketPickupTime  *gtime.Time `json:"ticketPickupTime"`
	VenueId           int         `json:"venueId"`
	ProgramTypeId     int         `json:"programTypeId"`
	CreatedAt         *gtime.Time `json:"createdAt"`
}

type PerformancesListResVo struct {
	Id                int                 `json:"id"`
	PerformanceName   string              `json:"performanceName"`
	PerformanceDate   *gtime.Time         `json:"performanceDate"`
	PerformanceTime   string              `json:"performanceTime"`
	StartSaleTime     *gtime.Time         `json:"startSaleTime"`
	TicketReclaimTime *gtime.Time         `json:"ticketReclaimTime"`
	TicketPickupTime  *gtime.Time         `json:"ticketPickupTime"`
	VenueId           int                 `json:"venueId"`
	VenueName         string              `json:"venueName"`
	ProgramTypeId     int                 `json:"programTypeId"`
	ProgramTypeName   string              `json:"programTypeName"`
	CreatedAt         *gtime.Time         `json:"createdAt"`
	State             string              `json:"state"` // 演出节目列表的状态
	SeatsStatusList   []SeatsStatusStatic `json:"seatsStatusList"`
}

// 票实时数据统计
type SeatsStatusStatic struct {
	TicketType int `json:"ticketType"`
	Total      int `json:"total"`
	Reserved   int `json:"reserved"`
	Remaining  int `json:"remaining"`
}
